<?php
namespace app\common\library\sms;

use think\Exception;

class SmsFactory
{
	public static function create($targetType, $options = [])
    {
        if (empty($targetType)) {
            throw new Exception("短信平台类型不能为空");
        }

        $class = __NAMESPACE__ . '\\' . strtolower($targetType) . '\\' . ucfirst($targetType) . 'SmsProcessor';
        
    	return new $class($options);
    }
}